﻿#region Usings
using FluentNHibernate.Mapping;
using NetScrum.Model.Entities;
#endregion

namespace NetScrum.Infrastructure.NHibernate.Mapping
{
    public class ProjectMap : ClassMap<Project>
    {
        public ProjectMap()
        {
            this.WithTable("netscrum_project");
            this.NotLazyLoaded();                

            Id(x => x.Id)
                .GeneratedBy
                .Identity();

            Map(x => x.Name)
                .WithLengthOf(100)
                .CanNotBeNull();

            Map(x => x.Description)
                .WithLengthOf(300);            
        }
    }
}
